﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Dictionary1">

    <Style TargetType="{x:Type Label}" x:Key="LabelIntestaStyle2">
        <Setter Property="Height" Value="23"/>
        <Setter Property="Width" Value="250"/>
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Background" Value="LightGray" />
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="Blue"/>
    </Style>


    <Style TargetType="{x:Type TextBox}" x:Key="TextBoxSelStyle">
          <Style.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true">
                <Setter Property="Foreground" Value="#202020" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter  Property="Background" Value="#808000" />
            </Trigger>
            <EventTrigger RoutedEvent="Loaded">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                            Duration="0:0:0.5" Storyboard.TargetProperty="Width" From="5" To="430"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                            Duration="0:0:0.3" Storyboard.TargetProperty="Width" From="5" To="430"  />                           
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Style.Triggers>
        
    </Style>
  
    <!-- -->
    <DataGridTemplateColumn Header="Date" MinWidth="100" x:Key="dataTemplCol">
        <DataGridTemplateColumn.CellEditingTemplate>
            <DataTemplate>
                <DatePicker SelectedDate="{Binding Date}" SelectedDateFormat="Short" />
            </DataTemplate>
        </DataGridTemplateColumn.CellEditingTemplate>
        <DataGridTemplateColumn.CellTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Date, StringFormat=d}" />
            </DataTemplate>
        </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>

    <!-- -->
    <Style x:Key="OrangeButton"  TargetType="{x:Type Button}">
         <Setter Property="BorderBrush" Value="Silver"></Setter>
         <Setter Property="Width" Value="110"/>
        <Setter Property="Height" Value="30"></Setter>
        <Setter Property="Margin" Value="2"/>
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="FontSize" Value="11px"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <!--<Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisual}" />-->
        <Setter Property="Background" >
            <Setter.Value>
                    <RadialGradientBrush>
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="#FFDDD40C" Offset="0.617" />
                        <GradientStop Color="#FF18AD74" Offset="0.074" />
                    </RadialGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>
    <!---->
    <Style x:Key="RowStyle" TargetType="{x:Type DataGridRow}">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Blue"/>
    <Setter Property="ValidationErrorTemplate">
        <Setter.Value>
            <ControlTemplate>
                <Grid>
                    <Ellipse Width="12" Height="12" Fill="Red" Stroke="Black"
                        StrokeThickness="0.5"/>
                    <TextBlock FontWeight="Bold" Padding="4,0,0,0"
                        Margin="0" VerticalAlignment="Top" Foreground="White" Text="!"
                        ToolTip="{Binding RelativeSource={RelativeSource
                                 FindAncestor, AncestorType={x:Type DataGridRow}},
                                 Path=(Validation.Errors)[0].ErrorContent}"/>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
 
</ResourceDictionary>